package 反射;

import java.util.concurrent.Callable;

/**
 * @author shy_black
 * @date 2019/3/21 13:40
 * @Description:
 */
class C extends Object{

}

class B extends C {

}

class A extends B implements Runnable, Callable {
    @Override
    public void run() {

    }
    @Override
    public Object call() throws Exception {
        return null;
    }



}

public class 获取信息 {
    public static void main(String[] args) {
        Class<A> cls = A.class;
        //取得包名称
        //public Object invoke(Object obj,Object... args)
        System.out.println(cls.getPackage());
        System.out.println("取得所有父类--->"+cls.getSuperclass());
        System.out.println("取得接口信息--->"+cls.getInterfaces());

        System.out.println(cls);
    }
}
